<template>
    <div class="m-logout"></div>
</template>

<script>
export default{
    layout: 'logout',
    middleware: async(ctx) => {
        let {status,data} = await ctx.$axios.get('http://127.0.0.1:8082/user/exit');
        if(status === 200 && data.code === 0){
            window.location.href = '/';
        }
    }
}
</script>